package com.ytxg.resource.controller;

import com.ytxg.core.dto.RestResp;
import com.ytxg.resource.dto.ImgVerifyCodeRespDto;
import com.ytxg.resource.service.ResourceService;
import io.swagger.v3.oas.annotations.Operation;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;

@RestController
@RequestMapping("/api/front/resource")
public class ResourceController {

    @Resource
    private ResourceService resourceService;
    /**
     * 获取图片验证码接口
     */
    @Operation(summary = "获取图片验证码接口")
    @GetMapping("img_verify_code")
    public RestResp<ImgVerifyCodeRespDto> getImgVerifyCode() throws IOException {
        return resourceService.getImgVerifyCode();
    }
}
